package com.tools.security.context;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public class SecurityContext {
    private final UserInfo userInfo;

    public boolean isLogin() {
        return userInfo != null;
    }

    @Override
    public String toString() {
        return "{" + (isLogin() ? "userInfo=" + userInfo : "un login") + "}";
    }
}
